package com.longlong.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.longlong.config.typehandler.ArrayStringTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.JdbcType;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("registration_form")
public class RegistrationForm {

    @TableId(type = IdType.AUTO)
    private Integer id;


    /**
     * 赛事Id
     */
    private Integer competitionId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 用户名字
     */
    private String name;

    /**
     * 用户年龄
     */
    private String age;

    /**
     * 用户电话
     */
    private String telephone;

    /**
     * 行业经历
     */
    private String industryExperience;

    /**
     * 赛道id号
     * typeHandler: 把字符串返回为数组
     */
    //@TableField(typeHandler = ArrayStringTypeHandler.class, jdbcType= JdbcType.VARCHAR)
    private String racetrack;


    /**
     * 作品名
     * ypeHandler: 把字符串返回为数组
     */
    //@TableField(typeHandler = ArrayStringTypeHandler.class, jdbcType= JdbcType.VARCHAR)
    private String title;


    /**
     * 比赛宣言视频地址
     */
    private String declaration;

    /**
     * 参赛作品链接
     */
    private String work;

    /**
     * 报名状态
     */
    private Integer participateStatus;

    /**
     * 获赞数量
     */
    private Integer likeds;

    /**
     * 表单是否提交完成
     */
    private Integer submitCompleted;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.DEFAULT)
    private LocalDateTime deleteTime;

    private Integer deleted;


    /**
     * 微信公众号openid
     */
    @TableField(exist = false)
    private WxGzhUser wxGzhUser;

    /**
     * 赛事信息
     */
    @TableField(exist = false)
    private RegistrationCompetition registrationCompetition;

    /**
     * 赛事信息
     */
    @TableField(exist = false)
    private RegistrationRacetrack registrationRacetrack;
}
